package com.bwie.product.feign;

import com.bwie.common.domain.ShopCar;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ShopCarFuling implements FallbackFactory<ShopCarFeignController> {
    @Override
    public ShopCarFeignController create(Throwable cause) {
        return new ShopCarFeignController() {
            @Override
            public Result<ShopCar> buyProduct(Integer shopcarId) {
                return Result.error("网络异常 请稍等=====>>>>>>");
            }
        };
    }
}
